﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SPFarmModeler.Common;
using SPFarmModeler.Business;

namespace SPFarmModeler.Business
{
    [Serializable]
    public class Server
    {
        public string Name { get; set; }
        public ServiceList Services;

        /// <summary>
        /// Constructeur
        /// </summary>
        public Server()
        {
        }

        /// <summary>
        /// Constructeur
        /// </summary>
        public Server(string name)
        {
            Name = name;
            Services = new ServiceList();
        }
    }

    [Serializable]
    public class ServerList : List<Server>
    {
        /// <summary>
        /// Permet de récupérer le serveur hébergeant la centrale d'administration
        /// </summary>
        /// <returns></returns>
        public Server GetCentralAdminHost()
        {
            return new Server();
        }

        /// <summary>
        /// Permet de récupérer les serveurs hébergeant un service donnée
        /// </summary>
        /// <param name="service">Nom du service SharePoint</param>
        /// <returns></returns>
        public List<Server> GetServiceHosts(TypeSPService service)
        {
            return new List<Server>();
        }
    }
}
